1. Field of the Invention
The present invention relates to traffic flow control using a token bucket for communication systems.
2. Description of the Related Art
“A Generalized Processor Sharing Approach to Flow Control in Integrated Services Networks: The Single-Node Case” by A. Parekh and R. Gallager (IEEE/ACM transactions on Networking Vol. 1, No. 3, June 1993) discloses a token bucket method for traffic control for communication apparatus. FIG. 7 shows an arrangement for traffic control using a token bucket according to the prior art. The arrangement shown in FIG. 7 is applied to transmitting side and receiving side of the communication apparatus.
Here, applying to transmitting side of the communication apparatus intends to control traffic to a network directly, and applying to receiving side of the communication apparatus intends to control traffic from a remote apparatus indirectly. That is, by limiting the data received by the apparatus, traffic flow control of the upper layer works and limits the data that the remote apparatus transmits to the network.
According FIG. 7, the apparatus for traffic control using a token bucket includes a token generation unit 11, a token buffer 12, a reading unit 13 and a data buffer 14.
The token generation unit 11 generates predetermined number, referred to as “token generation number”, of tokens at predetermined frequency, referred to as “token generation frequency”, and outputs them to the token buffer 12. The token buffer 12, which is so called token bucket, holds tokens generated by the token generation unit 11. On the other hand, the data buffer 14 is a buffer for storing data. In case of transmitting side, the data is data or a packet transmitting to the network, and in case of receiving side, the data is data or a packet from the network, and for example, output to other function blocks in the apparatus or common bus.
Token is a right for reading out the data from the data buffer 14, and the reading unit 13 reads out the predetermined amount of data, for example 1 bit or 1 byte, from the data buffer 14 by consuming one token. A product of token generation frequency (generations/second), token generation number (tokens/generation) and volume of read out data by consuming one token (bits/token) is referred to as token rate (bits/second). The token rate is equal to the averaged data rate read out by the reading unit 13, on the condition that amount of data to/from the network is large enough.
Traffic control using a token bucket can read out the data at data rate above the token rate while the token buffer contains sufficient tokens, which are accumulated while the intensity of data to/from the network is smaller than the token rate.